import * as types from "@/store/mutation-types";

const mutations = {
  [types.SET_TOKEN](state, token) {
    state.token = token;
  },
  [types.CLEAR_TOKEN](state) {
    state.token = "";
  },
  [types.SET_USERDATA](state, data) {
    state.userData = data;
  },
  [types.CLEAR_USERDATA](state) {
    state.userData = {};
  },
  [types.SET_LOADING_STATUS](state, status) {
    state.isLoading = status;
  },
  [types.SET_MMENU_INDEX](state, index) {
    state.activeIndex = index;
  },
  [types.SET_BACK_COLOR](state, color) {
    state.backcolor = color;
  },
  [types.SET_FONT_COLOR](state, color) {
    state.color = color;
  },
  [types.SET_OPACITY](state, opacity) {
    state.opacity = opacity;
  },
  [types.SET_HOCOLOR](state, hocolor) {
    state.hocolor = hocolor;
  },
  [types.SET_FILTER](state, filter) {
    state.filter = filter;
  },
  [types.SET_IS_LOGIN](state, islogin) {
    state.islogin = islogin;
  },
  [types.SET_HEAD_ISSHOW](state,isshow){
    state.isHeadshow = isshow;
  },
  [types.SET_SEARCH_DATA](state,list){
    state.searchDataList = list;
  },
  [types.SET_SEARCH_TOTAL](state,count){
    state.searchTotalCount = count;
  },
  [types.SET_SEARCH_VALUE](state,value){
    state.searchValue = value;
  },
  
};
export default mutations;
